$(document).ready(function(){	

	/* featured courses slides:
		s1 - HTML
		s2 - Dreamweaver
		s3 - Flash cs4
		s4 - Javascript
		s5 - PHP
		s6 - Wordpress
	*/
	
	$("div#featured-s1").show();
	$("div#featured-s2").hide(); 
	$("div#featured-s3").hide(); 
	$("div#featured-s4").hide(); 
	$("div#featured-s5").hide(); 
	$("div#featured-s6").hide(); 
	
	$("#featured-next,").click(function () { 
	
		if ($("div#featured-s1").is (':visible')) {
			/* show 2 */
			$("div#featured-s1").fadeOut();
			$("div#featured-s2").fadeIn("slow");
			$("div#featured-text").html("Dreamweaver CS3 Basics &nbsp;|&nbsp; 2 of 6");
		}
		else if ($("div#featured-s2").is (':visible')) {	
			/* show 3 */
			$("div#featured-s2").fadeOut();
			$("div#featured-s3").fadeIn("slow");
			$("div#featured-text").html("Flash CS4 Basics &nbsp;|&nbsp; 3 of 6");
		}
		else if ($("div#featured-s3").is (':visible')) {
			/* show 4 */	
			$("div#featured-s3").fadeOut();
			$("div#featured-s4").fadeIn("slow");
			$("div#featured-text").html("Beginners Javascript &nbsp;| &nbsp; 4 of 6");
		}
		else if ($("div#featured-s4").is (':visible')) {
			/* show 5 */	
			$("div#featured-s4").fadeOut();
			$("div#featured-s5").fadeIn("slow");
			$("div#featured-text").html("Beginners PHP &nbsp;|&nbsp; 5 of 6");
		}
		else if ($("div#featured-s5").is (':visible')) {
			/* show 6 */	
			$("div#featured-s5").fadeOut();
			$("div#featured-s6").fadeIn("slow");
			$("div#featured-text").html("Wordpress Theme From Scratch &nbsp;|&nbsp; 6 of 6");
		}	
		else if ($("div#featured-s6").is (':visible')) {
			/* show 1 */	
			$("div#featured-s6").fadeOut();
			$("div#featured-s1").fadeIn("slow");
			$("div#featured-text").html("Beginners HTML &amp; CSS &nbsp;|&nbsp; 1 of 6");
		}		
    });
    
    $("#featured-prev").click(function () { 
		
		if ($("div#featured-s1").is (':visible')) {
			/* show 6 */
			$("div#featured-s1").fadeOut();
			$("div#featured-s6").fadeIn("slow");
			$("div#featured-text").html("Wordpress Theme From Scratch &nbsp;|&nbsp; 6 of 6");
		}
		else if ($("div#featured-s2").is (':visible')) {	
			/* show 1 */
			$("div#featured-s2").fadeOut();
			$("div#featured-s1").fadeIn("slow");
			$("div#featured-text").html("Beginners HTML &amp; CSS &nbsp;|&nbsp; 1 of 6");
		}
		else if ($("div#featured-s3").is (':visible')) {	
			/* show 2 */
			$("div#featured-s3").fadeOut();
			$("div#featured-s2").fadeIn("slow");
			$("div#featured-text").html("Dreamweaver CS3 Basics &nbsp;|&nbsp; 2 of 6");
		}
		else if ($("div#featured-s4").is (':visible')) {	
			/* show 3 */
			$("div#featured-s4").fadeOut();
			$("div#featured-s3").fadeIn("slow");
			$("div#featured-text").html("Flash CS4 Basics &nbsp;|&nbsp; 3 of 6");
		}
		else if ($("div#featured-s5").is (':visible')) {	
			/* show 4 */
			$("div#featured-s5").fadeOut();
			$("div#featured-s4").fadeIn("slow");
			$("div#featured-text").html("Beginners Javascript &nbsp;| &nbsp; 4 of 6");
		}	
		else if ($("div#featured-s6").is (':visible')) {
			/* show 5 */
			$("div#featured-s6").fadeOut();
			$("div#featured-s5").fadeIn("slow");
			$("div#featured-text").html("Beginners PHP &nbsp;|&nbsp; 5 of 6");
		}			
    });
		
});